The use of databases is widely extended, however, there is a lack of testing and debugging tools to assist it's development. To test the correctness of an SQL query is difficult using actual databases, either because the number of rows in populated databases is usually large or because they have few data in early stages of development. 


To solve this problem we have developed a tool that, given an SQL database definition and a target view, finds a database instance for which the view's query does not return an empty answer, this is considered to be a positive test case. Implementing recent research results, we transform the search for this instance to a constraint satisfaction problem. We also expands this technique's scope by presenting a new approach for nested existential conditions.

We divide the test case generation process in three phases. First the SQL code of the database is analysed. Then, given the target view's name, the formulas representing the conditions that an instance has to satisfy in order to be a test case for this view are generated. Finally this formulas are translated into an specific constraint language, which solutions are the desired test cases.

This work presents a prototype which introduces new approaches in the field of databases and shows a way of solving the lack of test tools for it's development.

\section*{Keywords} Constraints, SQL, Test Case, Test, Databases